<?php defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );

/* JoomLeague League Management and Prediction Game for Joomla!
 * @version $Id: show_results.tpl.php 1151 2008-06-24 15:07:32Z julienv $
 * @package Joomleague
 * @copyright Copyright (C) 2007  JoomLeague
 * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see _joomleague_license.txt
 *  
 * Homepage: http://www.joomleague.de
 * Support: htt://www.joomleague.de/forum/
 * 
 * This file is part of JoomLeague.
 *  
 * JoomLeague is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * Please note that the GPL states that any headers in files and
 * Copyright notices as well as credits in headers, source files
 * and output (screens, prints, etc.) can not be removed.
 * You can extend them with your own credits, though...
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 *
 * The "GNU General Public License" (GPL) is available at
 * http://www.gnu.org/copyleft/gpl.html.
*/ 

global $htmlHelper;

?>
<div id="joomleague">
<a name="jl_top" id="jl_top"></a>
<!-- Header with Project Name-->
<?php if ($results_config['show_project_heading'] > 0 OR $overall_config['show_project_heading'] > 0) { ?>
<div class="componentheading" <?php if ($results_config['show_print_button'] == "1" OR $overall_config['show_print_button'] == "1") echo 'style="float:left;"';?>><?php echo $htmlHelper->showTitle($joomleague, $overall_config['project_heading_type']); ?></div>
<!-- Druckfunktion -->
<?php if ($results_config['show_print_button'] == "1" OR $overall_config['show_print_button'] == "1") {
$htmlHelper->PrintIcon( $row, $params, false, '' );
};?>
<!-- Druckfunktion Ende -->
<?php } ?>
<!-- Header END -->

<!-- section header e.g. ranking, results etc. -->

<table width="100%" class="contentpaneopen">
	<tr>
		<td class="contentheading">
<?php 
if ($current_round>0) {
  if ($results_config['show_section_heading']==1) {
    $title = _JL_RESULTS;
    if (isset($division)) $title .= ' '.$division->name;
    //1 request for current round
    $htmlHelper->show_matchdays_title($title, $rounds[$current_round-1]->id, $results_config);
	  if (defined('JL_SHOW_EDIT_ICON')) $htmlHelper->show_edit_icon($current_round, $jl_func);
	}
}

else {
	//1 request for current round
	if ($results_config['show_section_heading']==1) $htmlHelper->show_matchdays_title(_JL_PLAN." - ". $team->name, 0, $results_config);
}
	?>
    </td>
<?php 

// select navigation of matchdays for browsing mode START
if (isset($pageNav2)&&$results_config['show_matchday_dropdown']==1) echo '<td align="right">'._JL_MATCHDAYS_SELECT.$pageNav2.'</td>';
// select navigation of matchdays for browsing mode ENDS    
?>
  </tr>

</table>
<br />

<!-- Main START -->
<div id="jlg_ranking_table">
<table width="96%" align="center" border="0" cellpadding="3" cellspacing="0">
	<?php
		if ( isset($overall_config['results_below'])&&$overall_config['results_below']==1) 
		  $results_config['results_below']=1;
		
		$htmlHelper->resultsColspan($results_config);
		
		if (count($matches) > 0) {
		  $htmlHelper->show_matches($matches, $resultTeams, $results_config);
		}
	?>
</table>
</div>
<!-- Main END -->

<!-- Matchdays Output  -->
<?php if (isset($pageNav)&&$results_config['show_matchday_pagenav']==1) { ?>

<table width="96%" align="center" border="0" cellpadding="3" cellspacing="0">
  <tr>
   <td align="center"><br /><?php echo $pageNav ?></td>
  </tr>
</table>
<?php };?>
<!-- Matchdays Output END --> 

<!-- Print Button START -->
<?php if ($results_config['show_back_button'] > 0 OR $overall_config['show_back_button'] > 0) {;?>
<?php if ($results_config['show_back_button'] == "1" OR $overall_config['show_back_button'] == "1") echo '<div align="left">'; else echo '<div align="right">';?>
<?php
$params = & new mosParameters( '' );
$params->def( 'back_button', true );
$params->def( 'popup', false );
mosHTML::BackButton( $params );
  echo "</div>";
};?>
<!-- Print Button END -->
<?php
if ($jl_func != 'showresultsrank') {
	?>
	</div>
	<?php 
}
?>